/*
 * Copyright 2017 JessYan
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.kingeid.hlj.test.mvp.model.api.service;

import com.kingeid.hlj.test.mvp.model.api.service.params.LoginParams;
import com.kingeid.hlj.test.mvp.model.api.service.params.PhoneCode;
import com.kingeid.hlj.test.mvp.model.entity.BaseResponse;

import io.reactivex.Observable;
import retrofit2.Retrofit;
import retrofit2.http.Body;
import retrofit2.http.POST;


/**
 * ================================================
 * 展示 {@link Retrofit#create(Class)} 中需要传入的 ApiService 的使用方式
 * 存放关于用户的一些 API
 * ================================================
 */
public interface UserService {

    @POST("user/login")
    Observable<BaseResponse<String>> login(@Body LoginParams params);

    @POST("user/checkcode")
    Observable<BaseResponse> getCode(@Body PhoneCode params);
}
